package com.example.designpatterns.Iterator;

public class Client {
    public static void main(String[] args) {
        Aggregate agg = new ConcreteAggregate();
        agg.add(123);
        agg.add(234);
        agg.add(345);
        Iterator iterator = agg.iterator();
        while (iterator.hasNext())
            System.out.println(iterator.next());
    }
}


